import request from '@/utils/request'

export function login(username, password) {
  return request({
    url: '/oauth/token',
    method: 'post',
    data: {
      username,
      password,
      grant_type: 'password',
      client_id: 'auth-manager-server',
      client_secret: '123456',
      scope: 'server'
    }
  })
}

export function getInfo() {
  return request({
    url: '/sys/info',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/oauth/logout',
    method: 'delete'
  })
}
